Skip to content

feat(coprocessor): add re-randomization of transaction inputs#817

Merged
antoniupop merged 3 commits intomainfrom
antoniu/rerand
Oct 1, 2025
Merged

feat(coprocessor): add re-randomization of transaction inputs#817
antoniupop merged 3 commits intomainfrom
antoniu/rerand

Conversation

@antoniupop
Copy link
Copy Markdown
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Sep 3, 2025
@antoniupop antoniupop force-pushed the antoniu/rerand branch 7 times, most recently from c78c8a1 to c2b6b61 Compare September 19, 2025 15:54
@antoniupop antoniupop force-pushed the antoniu/rerand branch 6 times, most recently from fd9bb19 to dd87596 Compare September 25, 2025 13:14
@antoniupop antoniupop force-pushed the antoniu/rerand branch 7 times, most recently from 7e0c8ab to a3beb74 Compare September 29, 2025 08:02
@antoniupop antoniupop marked this pull request as ready for review September 29, 2025 08:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds re-randomization functionality to transaction inputs in the FHE computation system. The key changes include modifying the scheduler to support transaction-level re-randomization, updating database schemas to track allowed handles more efficiently, and adding cryptographic domain separators for secure re-randomization.

  • Added re-randomization of transaction inputs using cryptographic domain separators
  • Refactored database handling to track allowed handles at the computation level instead of separate tables
  • Updated scheduler to process transactions with re-randomized inputs and improved error handling

Reviewed Changes

Copilot reviewed 28 out of 50 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
coprocessor/fhevm-engine/zkproof-worker/src/verifier.rs Added re-randomization metadata and domain separators to ciphertext creation
coprocessor/fhevm-engine/tfhe-worker/src/tfhe_worker.rs Major refactoring to transaction-based processing with re-randomization support
coprocessor/fhevm-engine/scheduler/src/dfg/scheduler.rs Updated scheduler to handle transaction graphs and re-randomization
coprocessor/fhevm-engine/fhevm-engine-common/src/types.rs Added re-randomization methods to supported FHE ciphertext types
coprocessor/fhevm-engine/db-migration/migrations/20250920080000_computations_scheduling.sql Database migration to consolidate allowed handle tracking
Files not reviewed (20)
  • coprocessor/fhevm-engine/host-listener/.sqlx/query-0fe024db8ce4cb065633e9f02bd96e67b62460c4d725030ce6fb3b488d0541a7.json: Language not supported
  • coprocessor/fhevm-engine/host-listener/.sqlx/query-b8101284d4b6a652068f75060b8c52f8fb0b94968ced62f7a8471c4ecc9c6a93.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-0b85af1e88f24290121400feb960ef80ce040e2b877b259da17188668e6c404a.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-416ef65e70058585ce4cec14ef80330cd688076d02e375486d7ab07fab628280.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-5061d9ee69dd4a22aa118bd4d1ca26b4a02f9f690def1c3f08c34bf67ec95f8c.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-54ecfc9b50024b3f14bce1ee1f91b721b843292e0c314c058fb1adaaea118b96.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-641036eba016313ea7cf191d71f2b69c1def70ea46139dd02fb510581b6322c2.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-648e618238efe4b918570e78a235947075cc241f3af841e4d34fba3587268570.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-69eea32069c04ab351856d18f4b53d059e01468778eea9588aff3f8aee6171a7.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-6f7b577ff92824540d1baee24d9a4303e567bf70930a2869b934153b98837c38.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-82afc3c943c43f1f76e150c5d3354bef4482c3da82403ad6c03add0840e71966.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-86869a71d7bd80262a82765e77b819bab29e95c1d60ff31525172fb859c61cee.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-8767303b387a1e36636aac24abb209ae4ad9a106cc132b78048faf1e16b0b913.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-b0604a6a8057da679e9a51308240a8791161218c6583b31e7f78e043693288c0.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-b8101284d4b6a652068f75060b8c52f8fb0b94968ced62f7a8471c4ecc9c6a93.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-bbfc9833ed9cb4c8e98834dc715f70f2eab863af8b79a6c0faf9c249ac6ecaf0.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-c0e1b25662f8d9b3ec8813c028e0de5388e5094d8c316b29e6762bc2783939d2.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-d12da013cb1d11f23595b7d4f6e4d79f886ec342b77ab4166b6d1a8febd62f1a.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-d94483044765504ae794c16487fd225297876c170ba807360ae413fb9f837e5d.json: Language not supported
  • coprocessor/fhevm-engine/tfhe-worker/.sqlx/query-e196c95c847ee9fa0fe5a6473b219ab1c1544b7ebf40da17b7f273ce340678a8.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@antoniupop antoniupop force-pushed the antoniu/rerand branch 2 times, most recently from 408fd9e to 9efd8d9 Compare September 29, 2025 09:36
Copy link
Copy Markdown
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks generally ok for the rerand part, some comments and domain separators to update

the parameter mixing is not the right thing to do, though I don't know what purpose those parameters serve

Copy link
Copy Markdown
Collaborator

@dartdart26 dartdart26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't followed all the decisions made on how to implement it, but I can't see an issue right now. Approving it with the caveat that I might have missed issues.

@antoniupop antoniupop force-pushed the antoniu/rerand branch 2 times, most recently from 018778d to 1702b56 Compare September 29, 2025 20:56
Copy link
Copy Markdown
Contributor

@goshawk-3 goshawk-3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antoniupop antoniupop force-pushed the antoniu/rerand branch 12 times, most recently from cd259d6 to d10c07e Compare September 30, 2025 20:38
@antoniupop antoniupop force-pushed the antoniu/rerand branch 2 times, most recently from 5205e19 to eb758ba Compare October 1, 2025 10:04
@antoniupop
Copy link
Copy Markdown
Collaborator Author

@antoniupop antoniupop merged commit 0dcd380 into main Oct 1, 2025
164 checks passed
@antoniupop antoniupop deleted the antoniu/rerand branch October 1, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants